package com.xique.system.service.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xique.common.core.utils.StringUtils;
import com.xique.system.bean.domain.Area;
import com.xique.system.bean.dto.AreaDTO;
import com.xique.system.mapper.AreaMapper;
import com.xique.system.service.service.IAreaService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 地区码Service业务层处理
 *
 * @author ww
 * @date 2019-10-06
 */
@Service
public class AreaServiceImpl extends ServiceImpl<AreaMapper, Area> implements IAreaService
{
    @Autowired
    private AreaMapper areaMapper;

    @Override
    public AreaDTO selectAreaNameByCode(String province, String city, String district) {
        if (StringUtils.isEmpty(province) && StringUtils.isEmpty(city) && StringUtils.isEmpty(district)) {
            return new AreaDTO();
        }
        return areaMapper.selectAreaNameByCode(province, city, district);
    }
}
